layui.define(['layer'], function (exports) {
	var layer = layui.layer,
		$ = layui.jquery;
	
	var common = {
		loadContent: function(url) {
			var index = layer.load(2);
			var connectDom = $(".layui-content");
			$.ajax({
				type: 'GET',
				url: url,
				success: function (data) {
					connectDom.html(data || '');
					layer.close(index);
				},
				error: function (e) {
					layer.close(index);
				}
			});
		}
	};
	exports("common", common);
});